<form method="POST" action="translation_edit.php" enctype="multipart/form-data" >
<input type="hidden" name="translation[id_translation]" value="{{ translation.id_translation }}"/>
<input type="hidden" name="term[tone]" id="term_tone" value="{{ translation.getTerm().tone }}"/>

<table class="formtable" width="650">
	<tr>
		<td class="label" width="200">Kana *<br/>(Katakana / Hiragana)</td>
		<td>{{ form.autocomplete({id: 'ac_kana', url: 'ajax/term.autocomplete.php', name: 'term[kana]', hidden: 'translation[id_term]', class: 'large', value: translation.getTerm().kana, hidden_value: translation.id_term }) }}</td>
	</tr>
	<tr>
		<td class="label">Prononciation</td>
		<td><input id="term_pronunciation_romaji" type="text" name="term[pronunciation_romaji]" class="large" value="{{ translation.getTerm().pronunciation_romaji|escape }}"/></td>
	</tr>
	<tr>
		<td class="label">Intonation <br/> 	Cliquez pour changer</td>
		<td id="td_tone">
			{{ translation.term.getToneHTML()|raw }}
			<br />
		</td>
	</tr>
	<tr>
		<td class="label">Catégorie principale</td>
		<td><input type="text" name="translation[category]" class="large" value="{{ translation.category|escape }}"/></td>
	</tr>
	<tr>
		<td class="label">Titre</td>
		<td><input type="text" name="translation[title]" class="large" value="{{ translation.title|escape }}"/></td>
	</tr>
	<tr>
		<td class="label fortextarea">Traduction *</td>
		<td><textarea name="translation[translation]" rows="5" class="large">{{ translation.translation|escape }}</textarea></td>
	</tr>
	<tr>
		<td class="label">Autres catégories</td>
		<td>
			{% for categorie in translation.categories %}
			{{ form.autocomplete({url: 'ajax/categorie.autocomplete.php', name: 'translation[categories][]', class: 'large', value: categorie }) }}
		</td>
	</tr>
	<tr>
		<td></td>
		<td>
			{% endfor %}
		</td>
	</tr>
	<tr>
		<td class="label fortextarea">Image (.jpg, .png, .gif)</td>
		<td>
			<input type="file" name="image" />
			{% if translation.image %}
			<img src="images/translations/200/{{ translation.image }}"/>
			{% endif %}
		</td>
	</tr>
	
	{% if translation.id_translation %}
	<tr>
		<td class="label fortextarea">Commentaire mise à jour</td>
		<td><textarea name="translation[last_update_comment]" rows="5" class="large"></textarea></td>
	</tr>
	{% endif %}
	<tr class="actions">
		<td colspan="2">
			<input type="submit" class="button" value="Enregistrer"/>
		</td>
	</tr>
</table>
</form>